<?php
/**
 * @package		mod_qlform
 * @copyright	Copyright (C) 2012 ql.de All rights reserved.
 * @author 		Mareike Riegel mareike.riegel@ql.de
 * @license		GNU General Public License version 2 or later; see LICENSE.txt
 */
// no direct access
defined('_JEXEC') or die;
?>
<form method="post" action="<?php echo $action; ?>" id="mod-qlform-<?php echo $module->id; ?>" class="form-validate">
	<div>
		<?php if($params->get('addPostToForm') == 1 && isset($array_posts) === true && is_array($array_posts) === true) { ?>
			<?php foreach($array_posts as $k => $v) { ?>
				<input type="hidden" name="former[<?php echo $k;?>]" value="<?php echo $v; ?>" />
			<?php } ?>
		<?php } ?>
		<input name="formSent" type="hidden" value="1" />

		<?php if($fieldModuleId == 1) { ?>
			<input type="hidden" value="<?php echo $moduleId; ?>" name="moduleId" />
		<?php } ?>
	</div>

	<?php foreach($form->getFieldsets() as $fieldset) { ?>
		<?php $fields = $form->getFieldset($fieldset->name); ?>
		<?php foreach($fields as $field) { ?>
			<div class="form-item clearfix">
				<div class="form-label"><?php echo $field->label; ?></div>
				<div class="form-field"><?php echo $field->input; ?></div>
			</div>
		<?php } ?>
	<?php } ?>

	<div class="form-action">
		<input type="submit" value="<?php echo $submit; ?>" />
	</div>
</form>